Interactive Visualisation

Column 1

The sank of RMS Titanic in the North Atlantic Ocean on 15 April 1912, after striking an iceberg during her voyage from Southamoton, South East England to New York City. Estimated 2,224 passengers and crew on the boat, and more than 1500 died.

The dataset used in this analysis has only 1309 rows of passengers’ information. Therefore, any results from this analysis should be treated as estimate.

Casualty Statistics (Wikipedia)

Casualty Statistics (This Report)

Column 2

Passenger Count

1309

Number of Males

843

Number of Females

466

Kids < 12

108

teen 12 - 19

131

adult 19 - 65

1060

elder > 65

10

Column 3

Chart 4

Data Table

About

Reference

Dave Langer 2017, Intro to Machine Learning with R & caret, Data Science Dojo, Viewed 22 October 2021, https://www.youtube.com/watch?v=z8PRU46I3NY&t=1492s

Kaggle 2021, Titanic - Machine Learning from Disaster, viewed 22 October 2021, https://www.kaggle.com/c/titanic/data?select=gender_submission.csv

“Untergang der Titanic”, By Willy Stöwer - Magazine Die Gartenlaube, en:Die Gartenlaube and de:Die Gartenlaube, Public Domain, https://commons.wikimedia.org/w/index.php?curid=97646

---
title: "Titanic Analysis"
output: 
  flexdashboard::flex_dashboard:
    orientation: column
    vertical_layout: fill
    storyboard: true
    social: ["linkedin", "twitter", "facebook", "pinterest", "menu"]
    source_code: embed
    theme: readable
---



```{r setup, include=FALSE}

# R Libraries

library(flexdashboard)
library(tidyverse)
library(skimr)
library(caret)
library(DT)
library(plotly)

# Data import

titanic <- read.csv("titanic_final.csv")

# Data cleaning

titanic <- titanic %>% 
  dplyr::select(-X) %>%   # Remove the row number variable "X"
  mutate_if(is.character, as.factor) 


```


Interactive Visualisation
===========================

Column 1 {data-width=400}
---------------------------

![](\Users\karho\Desktop\R\github\titanic\Titanic_fallen.jpg){width=80%}
The sank of RMS Titanic in the North Atlantic Ocean on 15 April 1912, after striking an iceberg during her voyage from Southamoton, South East England to New York City. Estimated 2,224 passengers and crew on the boat, and more than 1500 died. The dataset used in this analysis has only 1309 rows of passengers' information. Therefore, any results from this analysis should be treated as estimate. ### Casualty Statistics (Wikipedia) ```{r} gauge(1500, min = 0, max = 2224, gaugeSectors(colors = "red")) ``` ### Casualty Statistics (This Report) ```{r} gauge(818, min = 0, max = 1309, gaugeSectors(color = "red")) ``` Column 2 {data-width=100} --------------------------- ### Passenger Count ```{r} passenger_count <- count(titanic) valueBox(passenger_count, icon = "fa-users") ``` ### Number of Males ```{r} male <- titanic %>% filter(sex == "Male") %>% count() valueBox(male, icon = "fa-mars", color = "grey") ``` ### Number of Females ```{r} female <- titanic %>% filter(sex == "Female") %>% count() valueBox(female, icon = "fa-venus", color = "grey") ``` ### Kids < 12 ```{r} kid <- titanic %>% filter(age_group == "Kid") %>% count() valueBox(kid, color = "orange") ``` ### teen 12 - 19 ```{r} teen <- titanic %>% filter(age_group == "Teenage") %>% count() valueBox(teen, color = "orange") ``` ### adult 19 - 65 ```{r} adult <- titanic %>% filter(age_group == "Adult") %>% count() valueBox(adult, color = "orange") ``` ### elder > 65 ```{r} elder <- titanic %>% filter(age_group == "Elder") %>% count() valueBox(elder, color = "orange") ``` Column 3 {data-width=500} ---------------------------- ### Chart 4 ```{r} ``` Data Table ========================= ```{r} datatable(titanic, options = list(pageLength = 50)) ``` About ========================= *Reference* Dave Langer 2017, *Intro to Machine Learning with R & caret*, Data Science Dojo, Viewed 22 October 2021, https://www.youtube.com/watch?v=z8PRU46I3NY&t=1492s Kaggle 2021, *Titanic - Machine Learning from Disaster*, viewed 22 October 2021, https://www.kaggle.com/c/titanic/data?select=gender_submission.csv "Untergang der Titanic", By Willy Stöwer - Magazine Die Gartenlaube, en:Die Gartenlaube and de:Die Gartenlaube, Public Domain, https://commons.wikimedia.org/w/index.php?curid=97646